using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SmallBasicFun.Tests.Quiz
{
	[TestClass]
	public class HighLowQuizTest
	{
		[TestMethod]
		public void TestQuiz()
		{
			SmallBasicFun.Quiz.StartHighLowQuizAt += question1;
			ApprovalHelper.ApproveProgramWindow();
		}

		private static void question1()
		{
			//if the tortoise y is 115
			//turn the tortoise to the right 63 degrees 
			if (Tortoise.GetY() == 115)
			{
				Tortoise.Turn(63);
			}
		}


		private static void question2()
		{
			//if the tortoise x is less than y
			//turn the tortoise 54 degrees to the left
			//otherwise turn the tortoise 22 degrees to the right
			if (Tortoise.GetX() < Tortoise.GetY())
			{
				Tortoise.Turn(-54);
			}
			else
			{
				Tortoise.Turn(22);
			}
		}

		private static void question3()
		{
			//display the message "elcomeway omehay!"
			MessageBox.MockShowMessage("elcomeway omehay!");
		}

		private static void question4()
		{
			//if the tortoise y is greater than 50
			//turn the tortoise 177 degrees to the left
			if (Tortoise.GetY() > 50)
			{
				Tortoise.Turn(-177);
			}
		}
	}
}